3.3.5 Transform

Transform rules provide arbitrary transformations provided the matched pattern meets specified constraints. The most common transforms in the built-in rule set are integration transforms.

Like substitution, transform replaces a subexpression with another. To initiate the action, select a subexpression and Transform . The response is a list of replacement candidates. Like the interaction described for Substitution (see §3.3.4) if the list contains exactly one item, it is applied automatically.

Transform rules are similar to substitution rules in that both are stored in an internal list and both match a pattern to procure a replacement. They differ in that transforms are not reflexive, do not require proof of identity, and have constraints.

A transform expression has the syntactic form shown in Figure 3.2. The first two operands use the pattern notation of substitution rules. The symbol reinforces the left-to-right directionality. The final operand, following the comma, is a Boolean phrase that applies additional constraints on the pattern.

Figure 3.2 Transform

Here is what a transform looks like as text input: ʈ∫1÷(a*x+b)ⅆx → 1÷a * ln|a*x+b|, a:k ∧ b:k, and here is its algebraic display: ʈ∫1÷(a⋅x+b) ⅆx→1÷a⋅ln |a⋅x+b|, a:k∧b:k. The example specifies an integration that can occur if the left operand matches a subject and if the subexpressions matching a and b within the subject are both constant.

In addition to patterns, the replacement and constraint operands make use of predicate functions. See 9.1.2 for more detail on transform expressions.

3.3.5.1 The Transform Rule Set

Transform applies rules taken from an internal collection. The collection can be supplemented several ways: from the workspace transiently, from the workspace permanently or from a file.

Transient transform rules are created by entering them in the algebra display. A transformation rule can be tested by selecting a test expression and applying Transform . Transformation expressions in the workspace are considered along with all the transformations in the internal collection. Once tested, a transformation rule can be added to the internal collection, where it will remain until it is removed.

Transform rules can be added from a file downloaded from the cloud or a web page. The file has the same .xml extension and format as that for substitution rules, except the element “transforms” is used in place of “substitutions”.